function loginNow() {
    var id = $("#id").val();
    var password = $.md5($("#password").val());
    $.post("/tnweb/user/login", {
        "userId": id,
        "password": password
    }, function (data) {
        if (data.code == 0) {
            $("#tips").html(data.msg);
            return;
        }
        if (data.code == 1) {
            layer.msg(data.msg);
            setTimeout("toIndex()", 2000)
        }
    });
}

function toIndex() {
    window.location.href = "/tnweb/index";
}
